#ifndef CLIENTWINDOW_H
#define CLIENTWINDOW_H

#include <QMainWindow>
#include <QPushButton>
#include <QLabel>
#include <QPlainTextEdit>
#include "client.h"
/**
 *客户端窗口
 * @brief The ClientWindow class
 */
class ClientWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit ClientWindow(QWidget *parent = nullptr);

    void init();
signals:

public slots:
    //连接服务端
    void connectServer();
    //断开连接
    void disConnectServer();
    //发送消息
    void slotSendMsg();
    //收到消息
    void slotReceiveMsg(QString msg);
private:
    //连接无服务端按钮
    QPushButton * connectBtn;
    //断开连接按钮
    QPushButton * disConnectBtn;
    //客户端socket
    Client * client = nullptr;
    QLabel * receiveMsgLabel;
    QPlainTextEdit * receiveTextEdit;

    QLabel * sendMsgLabel;
    QPlainTextEdit * sendTextEdit;

    QPushButton * sendBtn;


};

#endif // CLIENTWINDOW_H
